-- GENERATED SPELL FOR [Victorious Challenger] --


function spell0_30012(pUnit, Event) --@Rend,n/a--
pUnit:FullCastSpellOnTarget(11977,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30012', 15000, 1)
end

function spell1_30012(pUnit, Event) --@Shield Slam,n/a--
pUnit:FullCastSpellOnTarget(15655,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30012', 2338, 1)
end

function spell2_30012(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(11971,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30012', 30284, 1)
end

function spell3_30012(pUnit, Event) --@Victorious Challenger Dummy,n/a--
pUnit:FullCastSpellOnTarget(55716,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30012', 627, 1)
end

function Sorts_30012(pUnit, Event)
local choix_sorts_30012 = math.random(0, 3)
if choix_sorts_30012 == 0 then
pUnit:RegisterEvent('spell0_30012', 1, 1)
end
if choix_sorts_30012 == 1 then
pUnit:RegisterEvent('spell1_30012', 1, 1)
end
if choix_sorts_30012 == 2 then
pUnit:RegisterEvent('spell2_30012', 1, 1)
end
if choix_sorts_30012 == 3 then
pUnit:RegisterEvent('spell3_30012', 1, 1)
end
end

function mob30012_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30012', math.random(1500, 3000), 1)
end

function mob30012_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30012_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30012_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30012, 1, 'mob30012_Action')
RegisterUnitEvent(30012, 2, 'mob30012_Leave')
RegisterUnitEvent(30012, 3, 'mob30012_Kill')
RegisterUnitEvent(30012, 4, 'mob30012_Die')
